﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using UnityEngine;
namespace TinySkill
{
    public class action_play_sound : action_processor
    {

        //在关键帧开始的时候执行
        public override void begin()
        {
            base.begin();

            //获得参数
            config_action_play_sound data = frame.data as config_action_play_sound;

            //播放音效
            AudioClip audioClip = Resources.Load<AudioClip>(data.pathname);
            if (audioClip != null)
                _effect.user.audioSource.PlayOneShot(audioClip);
        }

    }
}


